<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./echarts.min.js"></script>
</head>

<body>
    <div id="con" style="width: 800px;height: 600px;"> </div>
    <script>
        var chartDom = document.getElementById('con');
        var myChart = echarts.init(chartDom);
        let option = {
            color: "red",
            xAxis: {
                type: 'category',
                data: ['张三', '李四', '王五', '闰土', '小明', '茅台', '二妞', '大强']
            },
            yAxis: {
                type: 'value'
            },
            series: [{
                data: [88, 92, 63, 77, 94, 80, 72, 86],
                type: 'bar',
                // showBackground: true,
                // backgroundStyle: {
                //     color: 'rgba(180, 180, 180, 0.2)'
                // }
            }]
        };

        option && myChart.setOption(option);
    </script>






</body>

</html>